News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Is This a Good Idea ?

Started by baltoro, April 25, 2011, 10:46:19 PM

Previous topic - Next topic

baltoro

We all, at one time or other, were inept beginner programmers,... :bg

...And, naturally, through trial and error (mostly error), we have compiled all kinds of annoyingly, dysfunctional Windows applications. Some of us, in fact, have become professionally error-prone and embed the same dumb mistakes in our source code without realizing what kind of collateral damage we are really doing. We tell ourselves it's all about job security,...but, actually, we're just blazing along at warp speed trying to crank out enough code to keep the boss from outsourcing our careers,...
...We create apps that hang,...perfectly,...or, apps that branch randomly from some undefined variable,...or, apps that bluescreen spectacularly,... :eek

So,...this is my concept: dedicate a thread (or, maybe, even a sub-forum) to cataloging all those dumb things that are SO MINDLESSLY EASY TO DO when building a Windows application, that completely violate the integrity of the executable,...things that EDGAR would find hilarious,...

...And, of course, I'm a little embarrassed to admit that this is the one aspect of programming that I have an ENORMOUS amount of experience with,...   

A perfect example of what I'm talking about is this blog entry from Raymond Chen: What's So Special About the Desktop Window?
Another good example is: Access Violations. We all get them,...they're annoying,...and there are seemingly endless ways in which you can generate one,... :eek
Baltoro

Magnum

Until XP came along, my coding mistakes were usually the reason I had to reinstall the O.S.

Have a great day,
                         Andy

baltoro

When I started out programming Windows, it was using the Visual Studio IDE, and C++,...I had no concept of COM, or the Operating System kernel, or any of the higher-level developments that really give Windows its power and flexibility.
My first book on the subject was: Programming Windows, Fifth Edition, by Charles Petzold,...which comes with a disc of thoroughly tested source code. It was relatively easy,...just include the source code into a Visual Studio Project and select 'build' from the Menu,...
But, assembly programming is so abstract,...and, is much more difficult,... :eek
Like Dave says, you see it all in your head,...
Baltoro

baltoro

#3
:eek ...OK,... so it's agreed then,...this is a REALLY CRAPPY IDEA. :eek
:eek ...Unfortunately,...I've got a tsunami of REALLY CRAPPY IDEAS,... :eek
I was hoping to become wealthy and famous by marketing them. All I need is a celebrity endorsement (and, no, I don't mean O.J.).
Baltoro

dedndave

when i first started writing win32 code, i had considered changing my nic to "c0000005"   :P
not so common anymore

Astro

I've managed not to destroy anything so far, but I hate it when I see an access violation!  :red :'(

I have spent slightly too long away from MASM so I have forgotten how to read some code I wrote already. I need to make extreme use of comments!

My biggest annoyance has to be POOR documentation for kernel level programming where it exists. I know M$ don't want us in there and would prefer we use UMDF now (UGH) but that is no excuse for a lack of clear documentation. I have C++ blindness, so asm is the only way for me and low level stuff.

Best regards,
Robin.

baltoro

And, yet, you can tell by the reports we get describing and analyzing the current malware techniques used by rootkits in the wild, that some groups of researchers (and, presumably organized criminals) have spent an awful lot of time studying the entire data structure and execution capabilities of the Operating system kernels. This is not by any means a trivial task, and, I imagine it would be incredibly time consuming,... :eek
Baltoro

Astro

Quote from: baltoro on April 27, 2011, 12:13:48 AM
And, yet, you can tell by the reports we get describing and analyzing the current malware techniques used by rootkits in the wild, that some groups of researchers (and, presumably organized criminals) have spent an awful lot of time studying the entire data structure and execution capabilities of the Operating system kernels. This is not by any means a trivial task, and, I imagine it would be incredibly time consuming,... :eek

Yes. I wish I knew 10% of what they do - my life would be so much easier! As evil as their intentions are, I do bow to their technical prowess.

Best regards,
Robin.

hutch--

I have always seen the humour in Microsoft attempting to "secure" Windows by making the security aspects OBscure and as usual it means those who are serious about trashing other peoples computers put in the effort to learn the list of obscurities for each OS version so they can exploit the lack of computer know how that most users have.

In the Win3.? days you could manually fix Windows by editing the WIN.INI and SYSTEM.INI files, usually from memory and fix a badly messed up computer in a few minutes. With the advent of NT4 and Win95 you had this obscure circuis buried at multiple levels in the registry that became harder and harder to fix to the extent that reinstalling Windows became the only viable option if you did not keep an up to date disk image, in those days a Norton Ghost image. I have done my share of fixing Win2000 and XP but mainly for the practice to find out why something got past my normal security, usually an act of stupidity on my own part but when you have finished playing games, an Acronis disk image completely solves the problem.

It is my view that Microsoft have thrown away much of their unasailable market lead by various acts of stupidity and while they still hold the bulk of the desktop market, over time they have pissed off so many people that it had lead to people finding different ways to use the Internet and perform simple computer tasks, portable gadgets being the main direction as it frees the vast number of non-tectnical people from the endless security hassles of keeping a desktop computer running.

A case of shooting the goose that laid the golden egg and wondering why the market is sagging. Vista just about send Microsoft under and while Win7 64 bit is a much better OS, it still suffers Microsoft's market control mechanisms that make it a dodgy and unreliable choice of OS to develop on. I use a tweaked version of XP with a Vista interface because it frees me from the irritations of Win7 which I mainly use for compatibility testing and at time watch video on.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

kind of like...
"outlaw guns and only outlaws will have guns"   :P

for a long time, i thought "viruses" were some kind of myth because i never had one - lol
if something was broken, i fixed it

Phil Klisma

#10
Quote from: baltoro on April 26, 2011, 04:43:10 PM
:eek ...OK,... so it's agreed then,...this is a REALLY CRAPPY IDEA. :eek
:eek ...Unfortunately,...I've got a tsunami of REALLY CRAPPY IDEAS,... :eek
I was hoping to become wealthy and famous by marketing them. All I need is a celebrity endorsement (and, no, I don't mean O.J.).
The idea sounds good to me...supposedly the road to hell is paved with good intentions, and if bugs count as good intentions ive been far enough down that road to actually see hell.  mistakes and flaws in your own code, and others is a very valuable learning experience when a post mortem is done to find out why it hangs, crashes leaks, etc. even trying to write code that you intend to cause a revelation of faults

Farabi

When I started coding using MASM32 my common mistake is wrong addressing memory. I always creating GPF and blame MS for this  :bdg
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

dedndave

not so much a bug, really
but i have learned a lesson that i might pass on...

i'll be coding along, and want to do something like this...
CellWidth        dd ?
CellHeight       dd ?
;
;
;
        mov     edx,offset CellWidth
        cmp     ecx,WM_HSCROLL
        jz      next_code

        add     edx,4             ;point to CellHeight

next_code:


while i am writing the code, my head is into a certain line of thought
i am too lazy or to involved in the code to take the time to make the data a structure
it should be in a structure so that defines in the data area may be moved around without screwing things up

the pain is - when you are done writing the code, and want to do clean-up,
you now have to go back and find all those (damned) things and make them right   :P
if i had made the structure to begin with, clean-up would be a snap

dedndave

here's one
although, i seem to be the only one guilty of doing it, i have done it twice, now   :lol

        OPTION  PROLOGUE:None
        OPTION  EPILOGUE:None

DeRef   PROC    lpStart:DWORD,lpStop:DWORD,lpExclusions:DWORD
;
;
;
DeRef   ENDP

        OPTION  PROLOGUE:None  <-------- NOT !!!!
        OPTION  EPILOGUE:None  <-------- NOT !!!!

Twister

QuoteMy coding mistakes were usually the reason I had to reinstall the O.S.

For some reason, I think this statement is just beautiful.

MS-DOS days. :clap: