Domain: charlespetzold.com
Stories and comments across the archive that link to charlespetzold.com.
Comments · 36
-
Re: Translation
i'd be interested to know how fast Clang compiles Petzond compared to msvc. including re-compiling with simple change with/without PCH & incremental linking enabled.
-
For trivial programming
I find Vi/G**/Make is still pretty simple. And things like SDL, GTK, QT, etc. simplify things even more. Having watched Windows development evolve for a long time I can sort of see what the submitter is saying but on the other hand anyone who ever wrote a C program for Windows in the 90's using the original Petzold books should really appreciate the frameworks available for Windows programming these days.
Again, I'm talking "Coding for fun, hobby, learning" here, just simple stuff. If it's a business app or something where the subject matter is complex than my feeling is the tools are still more helpful in overcoming that complexity than having to do everything from the bottom up.
-
Charles Petzold
Petzold is the old school C programmer and writer who authored many editions of the classic MS Press "Programming Windows" guide to writing GUI apps in C and (later) C#. He's never been a big fan of IDEs, but uses them anyway.
-
Help him understand computers from the ground up!
The Elements of Computing Systems is a great book if he really wants to get a grasp of computers from the level of logic gates on up.
Working through the exercises in each chapter, you use HDL to design your own logic gates, build them into more advanced circuits (DFF, adder, ALU, etc.), and then a full-fledged Von Neumann computer.
After that, you move into software mode, starting with machine language, then assembly, and finally a high-level Java-like language. Along the way your write your own symbolic assembler and compiler!
It's really unique - kind of like Petzold's Code, except you really create the stuff you're learning about. -
Re:Deitel & Deitel
Charles Petzold.
Programming Windows, First Edition
http://www.charlespetzold.com/pw5/ProgWinEditions.htmlSad. But TRUE!
-
Visual Basic makes you dumb
You should read this, "Does Visual Studio Rot the Mind? Ruminations on the Psychology and Aesthetics of Coding" By Charles Petzold http://charlespetzold.com/etc/DoesVisualStudioRotTheMind.html
-
Re:Windows tattoo
OK, a broken window may not be such a great logo, but do you know anyone who has a Linux tattoo?
-
Windows tattoo
OK, a broken window may not be such a great logo, but do you know anyone who has a Linux tattoo?
-
Re:This is why I prefer my BB
-
Re:This is why I prefer my BB
Windows is the single worst thing out there.
Or more likely, your simply inept.
-
Code by Charles Petzold
If this opportunity sounds interesting to you but you grew up with high level languages, definitely check out the book Code by Charles Petzold. I could really only keep up with the first 500 pages or so, but it is still incredibly insightful and interesting if you want to know how a computer really works. You could basically use it to learn how to build a computer from scratch and program it.
-
Did they fix that bug
...where VS Rots the Mind?
-
Re:Intellisense and Debuggers
Charles Petzold, an author of several well-known books on Windows programming, dislikes the CASE (computer-aided software engineering) features provided by modern IDE's such as Visual Studio. He gave a speech criticizing parts of the Visual Studio, in particular IntelliSense, the code generation wizards, and drag-and-drop GUI builders, and other convenience features of the IDE.
Petzold's article reminded me of Edward Tufte's famous critique of PowerPoint.
During the '90s, Microsoft (like many large companies) had several slogans, but one that they seemed to take to heart was "Making it easier". That perhaps should be kept in mind while reading the Petzold and Tufte articles.
-
Re:recommended for advanced programmers
The stupid file types and not mentioning Java in the same sentence made me giggle- then appending the code being spread out over 'who knows where' made me erupt in cacophony of coffee spits and deep satisfaction(yes I emanate loud noises when deeply satisfied) that I gave up on Java the second time around for swing.
WebSphere is a joy too isn't it?
There is always only one place to look for code in C#/.NET.
I highly recommend:
http://www.charlespetzold.com/dotnet/ -
Re:Do you really think it is the case...
Absolutely concentrate on the basics...
I wish that all of my colleagues would read Charles Petzold's "CODE - The Hidden Language of Computer Hardware and Software"
It covers, (in short order), everything that they don't seem to understand about how computers actually work!
-
Re:The worst workspace?
Yeah, but at least it doesn't Rot the Mind.
-
Developing for Linux is just easier.One of the reasons that Windows has the kind of IDE and debugger support that it 'enjoys' is because it needs it. Developing for Windows is nearly unmanageable without that kind of support. The Windows API is huge, complex, only occasionally and accidentally orthogonal, and in my experience mostly very poorly documented. I'm not the only one who thinks so:
"Today we are ready for the official release of the
.NET Framework 2.0. Tabulating only MSCORLIB.DLL and those assemblies that begin with word System, we have over 5,000 public classes that include over 45,000 public methods and 15,000 public properties, not counting those methods and properties that are inherited and not overridden. A book that simply listed the names, return values, and arguments of these methods and properties, one per line, would be about a thousand pages long.If you wrote each of those 60,000 properties and methods on a 3-by-5 index card with a little description of what it did, you'd have a stack that totaled 40 feet."
Meanwhile, the entire POSIX spec, suitable for fully implementing a POSIX system including the utility apps, with commentary and rationales for design decisions, fits in about two and a half feet of binders.
Intellisense is practically mandated if you want to work with an interface as baroque as Win32. And it's nice even when you're working with your own defined classes and structures. But it has its own drawbacks, as Petzold notes:
"For example, suppose you're typing some code and you decide you need a variable named id, and instead of defining it first, you start typing a statement that begins with id and a space. I always type a space between my variable and the equals sign. Because id is not defined anywhere, IntelliSense will find something that begins with those two letters that is syntactically correct in accordance with the references, namespaces, and context of your code. In my particular case, IntelliSense decided that I really wanted to define a variable of interface type IDataGridColumnStyleEditingNotificationService, an interface I've never had occasion to use."
I develop for many platforms at work. It's a core part of my job. I mostly enjoy writing code for Unixish platforms, and tolerate the Windows stuff. The APIs on Unix are small, well-thought-out, have few if any side effects, and tend to be thoroughly documented. I find very few interfaces on Windows have even a majority of these traits, let alone all of them.
I've rarely felt the need for more debugging support than Linux comes with. The problems tend to be simpler and more easily uncovered. Eclipse is nice, and appears to take many of the good things about Visual Studio and leave much of the bad behind. For some projects, it's very useful. For others, it's overkill.
Another item worth reading - the whole book, really - is The Art Of Unix Programming. For a Windows developer's perspective on the book, see here. Needless to say, I don't agree with everything he writes there, but you might find it interesting.
-
Re:why not?-Selling OSS services.
It's a damn IDE! Nothing more, nothing less.
Were it so innocent, would it have motivated this rant from Someone Who Should Know?
http://www.charlespetzold.com/etc/DoesVisualStudio RotTheMind.html -
Re:probably a good second book on the language...
I think CLR via C# is a good 3rd book, as it goes pretty deep into language stuff. First books usually teach the language, the second should teach the standard libraries. I would reccommend something like Petzold's Programming Windows with C# (you'll have to look for used versions) or his later Windows Forms books: Programming Microsoft Windows Forms (for 2000/XP era) or Applications = Code + Markup (which handles forms and XAML, the GUI markup language in Vista and WPF-Everywhere) There's also a decent intro to C# for C and C++ programmers on his site.
-
Re:Charles Petzold
I can't agree more. I'd also recommend his free
.NET Book Zero, which is specifically aimed at C/C++ programmers, and did I mention it's free? -
Charles Petzold
I liked the books of Charles Petzold: Programming in the Key of C# and Programming Microsoft Windows with C#. I don't know if they are up to date but I think they provide a basic overview.
-
Charles Petzold
I liked the books of Charles Petzold: Programming in the Key of C# and Programming Microsoft Windows with C#. I don't know if they are up to date but I think they provide a basic overview.
-
Re:Plethora of issues
In Linux the Kernel where all those system calls go, is pretty limited compared to Windows. Where most functionality is added for developers is in shared libraries.
One reason is that the basic API (generally POSIX with a few libraries and extensions) is objectively simpler, and in my opinion more elegant and orthogonal, than the Windows API. The Windows API has grown exponentially and haphazardly in many ways, and is now a monster that almost no one fully understands: Does Visual Studio Rot The Mind?
"Tabulating only MSCORLIB.DLL and those assemblies that begin with word System, we have over 5,000 public classes that include over 45,000 public methods and 15,000 public properties, not counting those methods and properties that are inherited and not overridden... If you wrote each of those 60,000 properties and methods on a 3-by-5 index card with a little description of what it did, you'd have a stack that totaled 40 feet."
Now, we have a printed copy of the POSIX standard here. In a set of 13 binders, it's about two and a half feet across. Only 7 of those binders actually cover the system interfaces (the equivalent of the System API above), and the other 6 are introductions, rationales, and descriptions of standard shell utilities. Note that this is the full documentation suitable for reimplementing it, not just notes on a 3x5 card. I'd call that objectively simpler.
-
Re:.NET
.NET is nice, but not perfect. Documentation is often crappy or missing, and backwards compatibility with older MS technologies is ugly. Also, pretty much all features in C# have been available in other languages, and often better implemented.
I think comparing C# to Objective-C is a little bit unfair. Objective-C is a much lower-level language. There's room for both languages. Obviously, programming in C# is much more convenient, but that doesn't mean that Objective-C is dated - it's just for a different audience. Mac OS X supports Java quite nicely, too, and I'm looking forward to what Apple's doing with Ruby in 10.5.
And finally, Visual Studio rots the mind.
-
Re:Not to sound like a fanboi....
MS products are great for building cut-and-paste business applications. They're business tools. They make for bad hacking tools. Right now, I'm trying to figure out how the CLR handles threading, specifically when calling a control that uses asynchronous method calls. Guess what, the documentation is incredibly vague, the newsgroup postings are worthless, and I'm having to take a best guess and hope for the best. Another question I had is how C++
.NET mixes managed and unmanaged code. What if I created a multithreaded C++ .NET application? How would it behave? For whatever reason, most hackers avoid MS products like the plague. When I search the web, I can find discussions about the most pedantic pieces of Perl, but the average C# discussion is about 'synergizing your GUI' or playing 'cool tricks with delegates'. The most prolific MS programmers seem to be architects who muck with design patterns. In short, .NET it's a business tool, not an engineering or hacking tool.
I've given a couple suggestions of good MS programmers. This list is by no means exhaustive. Frankly, outside of book authors, I don't know of any great MS programmers. There aren't many OSS projects for Windows and I don't have the foggiest idea who does what at Redmond. Some potential great programmers are:
Jeffrey Richter
He wrote 'Advanced Windows Programming' (the closest thing to a Steven's like opus on the NT kernel I've seen, and Richter still falls short).
Ken Henderson
He's a SQL Server guru. His book 'The Guru's Guide to SQL Server Architecture and Internals' is the closest thing I've seen to a documented reverse engineering of any MS product.
Bruce McKinney
He's the author of 'Hardcore Visual Basic'. Did I mention he hates VB.NET?
Michael Abrash
He's obviously a ringer, but still... He wrote the 'Zen of Assembly Language', the 'Graphics Programming Black Book', but he also worked on the XBox, DirectX, MS Word (IIRC), and Quake. When John Carmack bows before your graphics programming voodoo, that says something.
Honorable Mention:
Charles Petzold
It's also worth noting that 3 of these men are known for trying to pick apart a black box of a MS product. I'm sure there are some real programming luminaries at the Redmond campus, I just don't know who they are. -
Re:Font size? Huh?
This guy seems to know everything about Windows Presentation Framework. He says there is still weirdness working outside 96 DPI. Linky
-
Start with the basics then find out the rest
Read Charles Petzold's book "CODE - The Hidden Language of Computer Hardware and Software". It will give you a background in how computer languages and hardware were designed in a fairly approachable manner . After that grounding in the basics, you will be able to see that all the the languages and hardware are just different ways of solving the same problems, and switching between them will be much easier. Then if there is a specific technology you are interested in look it up in a search engine and/or Wikipedia to find out what that specific technology is all about.
-
Re:I would say IDEs
I would just like to back the parent up.
And although it might be considerd karma-whoring I would like to post a link to a great article: Does visual studio rot the mind?.
I think this is true, although the author of the article does agree, he then continues to say that VS is a necessary evil, well I guess he just hasn't met emacs yet (or vi for you vi-fans out there) -
"Code" is pretty good at explaining computers
It's a book by Charles Petzold that explains very well how computers work: http://www.charlespetzold.com/code/ The rest depends on how apt your grandma is at grasping concepts.
-
Re:Late breaking news from the article:
Try Charlez Petzold's books:
http://www.charlespetzold.com/books.html/ -
Re:Visual Studio? Is that like an Emacs mode?Intellisense saves me - easily - thousands of key-strokes per day.
Sorry, but I can't trust your opinion, because there's a fairly good chance that intellisense has rotted your mind
-
Obligatory Petzold reference on VSCharles Petzold, Win 32 guru, and also a teacher, has posted an excellent talk on the difficulties of using an IDE like VS, especially as a tool to use when learning programming. Sure, you could walk through the tutorials, and build "Hello World", but you're not learning how to program, but how to click buttons on the Wizards. Petzold even makes a very good case about why IntelliSense is *not* the best thing since sliced bread. Well worth the read.
Not to knock VS too much, it's a great IDE, which I've used since VS 97, and you can certainly configure it to work as preferable, from just using it as an editor/compiler, to using the excellent debugger, to running lex and yacc. [Well things have changed a while since I used it for this, it is a kick they recommend downloading Cygwin - times change!]
-
Become a craftsman...My recommendation would be to first decide how you best learn. If you learn best in a classroom, go for it. Otherwise - you already have a graduate degree in your MD, so you don't really need a computer science degree as well to convince people you're educated. If MIT's OpenCourseWare works for you - by all means use it. There are also numerous excellent books on most aspects of computer science available - Knuth, Stevens, Richter, Petzold, Stroustrop and many other good authors made far better teachers for me than I ever found in a university.
The market is currently quite rough, especially to break into. After being laid off when a product tanked on the market, I've gone a few months without having a single resume responded to - and I have almost a decade of professional programming experience that was applicable to the jobs I've applied for (and my resume used to keep the phones ringing daily for months when I posted it - the market has changed a bit).
I've been spending the extra time continuing development on my personal code library and projects, writing open source code, and working on a few products that I expect there to be a market for when they're done. That's how I'd suggest breaking into the field as well.
You have a very special situation though - you know, or can find out if you think about it and ask your colleagues, exactly what one fairly wealthy niche market needs. What software would help you - as a doctor - work more efficiently? What software have you and your colleagues found lacking? There's your first project
:)It won't be easy, and you won't make money fast. My recommendation would be to start learning about computers and computer programming now while thinking about products. As soon as you feel like you can design a useful program and have one in mind - take a shot at it.
Use CVS ( or for Windows, WinCVS ) or some other revision control so you can keep track of all the code you write (I wish I had when I started!). Estimate for yourself how long tasks should take - track those estimates, and figure out why they were right or wrong. Document everything, especially the code.
Once you have a product you think is worthy for your target audience - use it yourself in your work. Then let some colleagues try it out. Fix anything you find wrong with it, and ask your colleagues for suggestions.
Then, set up a website, advertise it, and try to sell it - or set up a project on SourceForge and make it open source - whichever you feel more comfortable with. On SourceForge, you'll be able to enlist the help of other more experienced programmers and together tailor the product towards excellence. If you sell it and it's successful, you'll be able to afford to switch careers to full-time programmer/entreprenuer and just work on your business.
That brings me to another point - if you aren't currently running your own doctor's office, start learning business skills too. They're just as hard to pick up as programming skills - possibly harder for some. Figure out what you'll need to do to start running your own software company. Even if you decide to write your own software as open source and become an employee for someone else professionally, this will help you at the negotiating table.
What I would NOT recommend is dropping out of medicine, getting a BS in computer science, and expect doors to be immediately open when you g
-
Worthy of a tattoo?
The big question is, would you tattoo it on your arm like Charles Petzold and his Windows logo?
Chip H. -
Charles Petzold
When I was required to do Windows programming five years, my colleagues referred Charles Petzold's Programming Windows to me. It was a wonderful book for beginners to start out with and it is probably the closest the Windows world has to the "Stephens' books".
You may find more information at his site: charlespetzold.com. -
Sigh. Petz. Ick
This has been around since 3.1 and is a very good tutorial.
Actually it's been around since 2.0 -- or was it 1.0? The earliest edition I've seen (either 1.0 or 2.0, can't remember) referred to Windows as "The MS-DOS Presentation Manager". Which fit in with the original purpose, which was to make DOS look like OS/2. My copy is for Windows 3.0, the first version anybody outside Microsoft took seriously. I remember being extremely irritated by three things:- No only was the book expensive, but it didn't include a disk with the source code. You had to write away to CP himself to get that, and it wasn't cheap either.
- In keeping with the design philosophy of Windows, CP has a "complexity is power, power is complexity" philosophy. This is reflected both in his programming style, and in his prose.
- I expended considerable mental energy on the chapter on memory management -- which left me fairly angry when I read the very last paragraph. This explained that the preceding text (unchanged from the previous edition) was only useful if you planned to write real-mode or protected-mode programs. No sane programmer does these things -- that's why 3.0 was the first version anybody took seriously.
If you just need to hack out some quick GUI application, you should use an IDE environment that supports this. Some good ones are available free. If your stay in Windowsville is short and involuntary, you might consider a Java IDE, so at least you'll pick up some skills that you can take back to the Unix world. Or if you neeed native code, you might consider Delphi. Strangely enough, Delphi is quite popular amongst low-level Windows API hackers. This does seem strange, given that Delphi uses a dialect of Pascal, and Windows is very C-centric. But a lot of people feel that Delphi's advantages offset this semantic impedence gap.