News for hackers. Stuff that matters.
Re:Forgotten Language: Jorf could have been Python or Ruby (... by brusch64 on Tuesday October 13, 2015 @04:46AM (#10379199)
Regarding the "Windows culture":

WinProc programming was indeed pretty horrible. Didn't really program a lot in WinProc - but I've cut my teeth with MFC which was supposed to make it better.

They broke down the big switch in the program and created classes (the c in MFC) and macros.

The VCL of Borland was more abstracted, but we've used MFC.

I am pretty happy that I don't have to do this any more.

When I started with C# and Windows Forms it seemed like a revelation for me.

Re:Forgotten Language: Jorf could have been Python or Ruby (... by gecko on Tuesday October 13, 2015 @07:46AM (#10379749)
You know what's ridiculous? I totally agree that WndProc was horrible. But the web community is now reinventing it so directly that all I can do is bang my head repeatedly on my desk.

Have you seen Facebook's Flux/Dispatcher framework, for example? The Dispatcher is usually a massive switch statement that takes a single argument, which will be a record field that corresponds with the event type. It's exactly like switching on uMsg and then casting lParam to the relevant struct. And this is considered one of the absolute best web frameworks available right now.

On the bright side, I suppose we can look forward to equivalents of message crackers, OWL, and MFC for React soon enough.

Re:Forgotten Language: Jorf could have been Python or Ruby (... by gecko on Tuesday October 13, 2015 @10:03AM (#10380508)
And the comment is now a blog post with more context for those who were lucky enough never to write raw Windows code: http://bitquabit.com/post/the-more-things-change/
Re:Forgotten Language: Jorf could have been Python or Ruby (... by nubianwarrior on Tuesday October 13, 2015 @12:07PM (#10381373)
Good article.
Re:Forgotten Language: Jorf could have been Python or Ruby (... by narrator on Tuesday October 13, 2015 @09:06AM (#10380105)
One thing that also reminds me of Windows culture in web development is the continuous reinvention of how to do the same old boring stuff.
Re:Forgotten Language: Jorf could have been Python or Ruby (... by mstade on Tuesday October 13, 2015 @07:55AM (#10379781)
Haha yes, this is so on point it makes me laugh and then want to cry a little bit. Also, they host conferences for these things, where the kool-aid is a-plenty.
Re:Forgotten Language: Jorf could have been Python or Ruby (... by neurohax on Tuesday October 13, 2015 @11:42AM (#10381184)
I am creating this small library that can be described as "jquery for streams of heterogeneous schemaless messages" which pretty much could be a lean replacement for the ugly switch at flex-like architectures. You can sneak a working barebones, very early preview at https://github.com/constructo/neurobus
Re:Forgotten Language: Jorf could have been Python or Ruby (... by agumonkey on Tuesday October 13, 2015 @09:09AM (#10380128)
It kinda frightens me too. Partly because reinvention at that scale is a bit sad, partly because it took me far too long to unplug myself from the current trends thrill and realize it.

Somehow it also says something, whatever the underlying structure, local and native VS remote and abstracted (dom/js), some patterns keeps coming back over and over.

Re:Forgotten Language: Jorf could have been Python or Ruby (... by kaonashi on Tuesday October 13, 2015 @12:13PM (#10381415)
> The Dispatcher is usually a massive switch statement that takes a single argument, which will be a record field that corresponds with the event type.

Stores have the switch, and you're supposed to break those up along model lines. In most the apps I've written, they never get beyond 4 or 5 branches.

Re:Forgotten Language: Jorf could have been Python or Ruby (... by mosburger on Tuesday October 13, 2015 @11:12AM (#10380988)
Also, incidentally, how Java 1.0 handled events in its windowing toolkits IIRC.
Re:Forgotten Language: Jorf could have been Python or Ruby (... by pjmlp on Tuesday October 13, 2015 @06:10AM (#10379419)
Coming from a Borland background, MFC was pretty bad when compared with any of its frameworks.

However in MFC's defense I think one can blame it on Microsoft's study group. I read somewhere that the Afx prefix came from their original design. A framework close in spirit to OWL, but their study group deemed it to high level.

So they made it a thin wrapper over Win16 instead.

On my case, the few cases I was forced outside OWL and MFC into pure C land, I use a set of macros from the Windows SDK.

They weren't properly documented, but with the Windows 3.1 SDK Microsoft created a kind of "type safe" handles and message dispatch macros, which relieved the WndProc pain.

Nevertheless, Xlib was even worse.

Re:Forgotten Language: Jorf could have been Python or Ruby (... by brusch64 on Tuesday October 13, 2015 @09:13AM (#10380166)
I've heard the same thing about the Afx macros and the plan for another more ambitious framework.

In my opinion the biggest obstacles for MFC were: * a pretty bad C++ compiler (the first good MS C++ compiler was the one with Visual Studio 2003 as much as i remember) * that the core group were "old school" C guys that either couldn't design a better object oriented system or thought that it would be to hard for the "normal" developers

Re:Forgotten Language: Jorf could have been Python or Ruby (... by pjmlp on Tuesday October 13, 2015 @01:56PM (#10382216)
Just decided to do a bit of archaeology.

The macros in the Windows 3.1 SDK were the strict header mode and message crackers.

https://support.microsoft.com/en-us/kb/83456

It made my life sane every time I had to use C instead of C++, and yet very few people knew about them.

Petzold never mentioned them in his books, I discovered them by chance in another book.

Nice to know that the Afx story might have not been a rumour, since other people heard the same.

My first Visual C++ was v5.0, by then it was already clear that Borland was on they way out as first choice. Sadly.