|
Great post and interesting experience.
sickfile wrote: then i got me the win32 forgers tutorial and later the petzold's programing windows.
i never looked back at mfc or even oop for that matter.
Very interesting.
sickfile wrote: let the juniors learn programming in the most strict type safe languages, but when they come to work in c they'll have to face complete freedom and responsibility.
Interesting philosophy.
I like compilers to warn me about things as much as possible. And type checking is quite helpful.
I think of "string programming" often and how that if everything is based upon a string then you can hurt yourself terribly because the "string" is only evaluated at run-time and then maybe that string has the wrong type in it and everything fails. I lean as far away from that idea as I can because those types of things can be very difficult to find in production code.
By saying this I'm not saying your advocating "string programming", it's just a way of explaining why I do like modern frameworks and compilers to a certain extent...but not beyond that extent as some things try to take it to the place where devs "dont ahve to think".
|
|
|
|
|
i am talking about providing people who have learned programming (3+ years) in the most strict type safe languages the ability to work in a language that permits to call a function defined as having one integer parameter with a floating point argument.
or something else like this:
float f;
char funct1(char c);
char b = funct1(f);
without a compile time error, only with a warning.
i ask this because you can call an assembly subroutine that does logical floating point operations on some address in memory regardless i you put in that address something that for you is logically an integer. the subroutine will do it's job.
and because the compiler sees that the function parameter should be of type char it will push to the stack frame for the function only char size data from the address of the float f.
i advocate to make C more powerful not by moving it in the java (ex-hype) direction, but in the assembler direction on one side and on the other side by working on the preprocessor to make it as powerful as LISP is.
the above floating point example is trivial and meaningless, but if you have structures composed of other structures that are hierarchically alined i am getting at something.
and of course i am not going to hire for a C programmer someone who has not learned every bit of strict data types, but when this guy starts working in C i don't want the compiler to impose restrictions on him, only warnings.
there is a big difference between a guy who values every byte and a guy who converts everything into string to avoid type errors.
|
|
|
|
|
Nice post. I understand exactly where you're coming from. One bit I can add is that I can remember, about 15 years ago, taking a relatively large application written in C++/MFC and recompiling it with C++/CX, adding .Net features, hooking it up to WCF, and even having it support auto-install when new versions were available. As far as I was concerned, that was the future.
Little did I know how strongly Microsoft was hated. Why didn't C++/CX catch on? Because it was Microsoft-only, and that meant you couldn't write software for the 5% Mac/Linux market that zealots struggled mightily to target. Then Java comes along and, though it does have some strong points, it really has nothing over VB other than it's not Microsoft.
Finally, someone figures out the right coding gymnastics and mystical incantations to get javascript to work in a browser. True, the resulting software was and still is vastly inferior, but it does have one thing going for it: It's not Microsoft! So now a generation of developers is condemned to a world where javascript is actually considered capable of making production-quality code because the users have been conditioned to accept it. So here we are now writing software whose responsiveness would make the 90's VB guys laugh all while laboring under platform burdens: *Types, what's that? *Threads, you mean link on my shirt? *Oh, F5? Yeah, don't touch that. *No, don't use that menu, that's the browser's menu. Use the menu within the menu. *No, that window can't be moved. It's just drawn to look like a window. *Sorry, you need Internet access to use the software, but have I mentioned that it doesn't require Windows to run? Yeah, I know most people still run Windows, but Windows isn't open source! <sigh>
|
|
|
|
|
Great post. It is very interesting that the weakest language choice of all (JavaScript) has become the defacto standard for coding.
I really, really like JavaScript but I also hate a lot of it. There are still no great debuggers for it -- setting them up is annoying and you don't get the kind of debugging you get from other compiled languages.
JavaScript teaches many anti-patterns of coding that have to later be torn out. And, as Internet rumors go sometimes those anti-patterns are vehemently fought for and almost become an issue of, "well, who can say really?" Meanwhile we had these better stronger languages that got ignored because of ease. Python is kind of the same travesty. Anyone can Python something. Just add a library.
|
|
|
|
|
CygnusBMT wrote: Little did I know how strongly Microsoft was hated. Why didn't C++/CX catch on? Because it was Microsoft-only I sure recognize that. It frustrates me even more in another area, one that is not MS-only, just that MS was the first major company to adopt it:
When I for the 17th time that day have to specify a password to get access to some service, I expel words that migth cause my post to be censored, if I wrote them down here. For 25+ years, we have had a very well designed solution for that.
Every time I read about another passord leak, where x million passwords have come out in the wild, I sigh: For 25+ years, we have had a very well designed solution for that.
Why should a cleartext password ever be transmitted over Internet? There is no need whatsoever for that! It is like every border crossing insisting on a specific passport for that crossing. Or a movie theater ticket where I have to specify a secret code before being allowed to use it to enter the theater.
MIT did an excellent job designing the Kerberos system. Sure, version 5 does have some functional limitations, such as safe forwarding of authorization to backend servers - but none of the solutions used today handle that! Those limitaions is definitely not the reason why Kerberos authentication was not adopted on a wide scale. Nor is it explained by any sort of "proprietary" arguments - it is free and open source code. Its origins are in the Unix world, and it standardized in the RFC series - it is not steered and controlled by some commercial company (the way e.g. Java is). It has been thoroughly testet on a wide range of operating systems. There are several (very well written) articles describing the principles, and these are well known in the academic communities.
So why are we still fighting with umpteen daily password entries, with lots of password leaks, with every service making different requirements for "secure" passwords...
The is one essential reason: When Kerberos 5 arrived, Microsoft was the first major commercial vendor to adopt it, before it had gained foothold on other platforms (notably *nix and open-source). Rather than saluting the early MS adoption, MS antagonists concluded that "If MS is going to use it, we, sure as h*** are not going to!" In theory there shouldn't be a Not Invented Here syndrome - MIT isn't Microsoft. Yet, being the first major adopter had that effect.
My guess is that if MS had held back for, say, five years, letting *nix/open-source communities be proud of the great design of Kerberos, we could have had decent network authentication and authorization for twenty years by now.
In spite of it being well known in academic cirles, there really weren't many active Kerberos proponents in non-MS environments, and the typical two-week-student-internet-project couldn't be burned by "unneccessary" functionality like authentication and authorization. Yet, I believe that if MS had kept back, it would have been promoted as The authentication solution. It is a pity that it didn't go that way.
I do think that NIH (or: the decision to adopt it wasn't driven by us) is quite essnetial. From other turf wars, such as the OSI protocol stack vs. the TCP/IP suite, I know of very explicit Not Invented Here: In the 80s, a former colleague of mine was essential in develoment of an X.400 email system. He got involved in IETF work when SMIME was being defined, and in a couple areas he suggested that a the solution developed for X.400 was adopted, both because it was well designed, and to ease mail exchange between the two mail standards. The proposal was bluntly rejected by the meeting: If X.400 does it that way, we will certainly not! We are not here to define anything OSI like! ... This X.400 expert soon learned that he might get a few good solutions through, as long as he presented it as his own thoughts, and kept shut about X.400. None of the SMIME people would touch OSI solutions with a ten foot pole, and didn't know anything about it to reveal where his ideas were found.
|
|
|
|
|
Thank you, sometimes its good to read some sanity.
Quote: So here we are now writing software whose responsiveness would make the 90's VB guys laugh all
Oh god, we now have web-browser based text editors! Type key, wait 300 ms (on a 2019 i9 with 64 GB RAM) and then the text shows on screen. I hate it.
|
|
|
|
|
I had a look at my VS2019 installation.
I had to install the Visual C++ MFC x86 and x64 before I could create a MFC desktop application.
All working as expected now.
|
|
|
|
|
I posted the update on the original post with a link to that image for others.
|
|
|
|
|
Chances are about zero that MS would drop MFC at this point, but I am still only going on indicators.
1) MS has recently redesigned all the MFC code generation templates. They were looking pretty outdated. They now have the slick look of the VS Installer now. VS 2019 Preview is their first attempt at redesigning the rest of the project creation wizard. I think it has promise. MS is even experimenting with the Office-style semantic ribbon for the aging menu-based Visual Studio. (See WinDbg x64 Preview).
2) MS has in the last year released a very critical piece of technology called ARM64 meaning your exact same MFC code re-compiled should be able to run on SnagDragon chip sets with no overhead. Think MFC for the mobile market. What framework did they release it on? MFC. See VS Installers' Individual components.
3) IMO, it was inevitable that MS would eventually migrate back to ISO standard C++. MS finally realized it shouldn't be in the business of inventing (and maintaining) computer languages. The computing world has legitimate teams of well-qualified people that do this in the ISO standards org. And MS got out, but only after trying everything else. My point is, MFC provides a "very efficient way of connecting (windows) messages to (your) message handlers (in C++)" as Jeff Prosise wrote in his MFC book many years ago, while staying within the standard maintained by the rest of the world. And according to Herb Sutter, chair of ISO C++, the number of academic papers submitted to the committee this year has increased from 120 to 200 in one year. The one thing MS has over its competitors is backwards compatibility and MFC does just that with the added plus of the world advancing it for them.
I write all my code in C++17 MFC. Never left it. I have been nervous for 15 years that MS would "embrace, expand, extinguish" MFC, but to their credit, they haven't, or more likely, they couldn't after many many attempts. It is paramount that my code be maintainable and the advances C++ has made over the years have let me do that. For example, my current app contains a real-time recursive parser which can be destructed without leaks for any depth or recursive complexity thanks to the std::shared_ptr C++ smart pointer innovation. And there are many more such innovations in the language I get for free in MFC.
|
|
|
|
|
Great post, very interseting.
rtischer8277 wrote: ARM64 meaning your exact same MFC code re-compiled should be able to run on SnagDragon chip sets with no overhead.
Very cool. I hadn't heard about that.
rtischer8277 wrote: IMO, it was inevitable that MS would eventually migrate back to ISO standard C++
That's exactly what I was thinking and hoping to always be true.
rtischer8277 wrote: "very efficient way of connecting (windows) messages to (your) message handlers (in C++)" as Jeff Prosise wrote in his MFC book many years ago,
I always thought so. Also, that Prosise book is one of my knock-down, all-time greatest favorites of the tech book world. It covered stuff like no one else did and the "story of the technology" was presented so well. It felt like he was Charles Petzold II. But sometimes better.
|
|
|
|
|
"Chances are about zero that MS would drop ..." That's what we said about OleDB back in 2012 when they announced that they were dropping it... And of course they had to bring it back last year.
Maybe they've learned?
|
|
|
|
|
Is a lazy baby kangaroo a pouch potato?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
... and that makes mum hopping mad
Message Signature
(Click to edit ->)
|
|
|
|
|
How koala say something like that!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
We quite in-joey these posts.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
And when the youngun gets to old for the puch does he become a Rootabega?
Got my site back up after my time in the woods!
JaxCoder.com
|
|
|
|
|
That lifestyle apeels to me.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Just gave this[^] a try and it's pretty awesome. At least in my n00b experience with VS Code (had to actually install it first ) and Kanban.
I am occasionally impressed with what's there in the OSS community, and Marcel Kloubert's Kanban plugin definitely impressed me for its simplicity, elegance, and ease of use.
Latest Article - Slack-Chatting with you rPi
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Forgive the stupid question but what is it?
|
|
|
|
|
My thought exactly.
I clicked on the link and there is no explanation on what it is.
I'd rather be phishing!
|
|
|
|
|
Richard MacCutchan wrote: Forgive the stupid question but what is it?
Kanban - Wikipedia[^]
Reduced to its minimum, it's like a 3 or more column board where you put sticky notes to indicate the state of a task. Which I find really helpful for keeping track of tasks.
A nice writeup here on CP.[^]
Latest Article - Slack-Chatting with you rPi
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Thanks. I could have done with that back in 1983 when I was running a medium sized project. As it was I drew a free hand CPM chart on a blackboard. And prayed that the cleaners would leave it alone.
|
|
|
|
|
Kanban - Wikipedia[^]
Kanban is a type of prodution worflow methodology/theory. It is used in manufacturing and has been ported over to SDLC, etc.
edit: I see Marc answered with pretty much the same explanation.
|
|
|
|
|
|
Very nice, thanks for the link!
Got my site back up after my time in the woods!
JaxCoder.com
|
|
|
|
|