Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

krsmichael

@krsmichael
About
Posts
11
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to make this not stop?
    K krsmichael

    Wimdows, MacOSX, Linux, GCC, Visual Studio.....?

    C / C++ / MFC tutorial question

  • Protect the running process - searching an old artical
    K krsmichael

    You can find an answer to this in the Secure Coding Cookbook. There are some elegant macros that you wrap around the methods you want to watch. Even if a checkpoint is set, the checksum of the method will change. Som compilers let you set the code segments to read only. You might want to read about that as well.

    C / C++ / MFC algorithms tutorial announcement

  • how to make this not stop?
    K krsmichael

    What environment?

    C / C++ / MFC tutorial question

  • Thats why i hate c++
    K krsmichael

    I would not be be able to code PL/I at the level I was doing it in the 80's. Although I still remember segments of PL/I, JCL and ISPF. I wrote channel drivers. I wrote an implementation of Kermit in PL/I. Yeah, I think I had it wired. Today, I'd have to get reacquainted with it again. I was definitely an expert and was made the IBM mainframe advisor for General Dynamics Western Division. As far as meaningless, I disagree. One of the strengths I bring to a job is the vast diversity of languages I've used. There is nothing new under the sun and I've reverted to ideas that I was exposed to, to implement "novel" things today. I am not familiar with Autocoder but I'm certain there were novel constructs that would be applicable to solving problems today. I started C++ with CFront on MPW. I've been with it to the present. However, it isn't a one tool fits all. I use other tools when they make sense. The aversion to the "I hate C++" post is due to the history of seeing this posted and then accepted as fact. I work for Qualcomm. I use C and C++ a lot. When I recruit at local technical colleges and the hardest thing they have had to develop with is Java, I find it hard to take the student's education seriously. I want to see students who know assembly. Not so that they can code in it, but to demonstrate they have some knowledge of what is going on underneath the covers. We want to know that the person has the ability to resolve issue not only at the software level, but at the hardware level as well. But to answer your question, I do a lot of things expertly. I've worked on many projects that has personally affected you or those around you.

    The Weird and The Wonderful c++ help learning

  • the outsourcing curse strikes again!!
    K krsmichael

    God bless the Indian Firms. I have made $1000s of dollars "fixing" and making legal, code generated overseas. For 10 years, it was my bread and butter. The upfront cost of doing business with Indian shops is cheaper up front but the costs rise rapidly when the company has to hire me.

    The Weird and The Wonderful csharp asp-net security business tutorial

  • Thats why i hate c++
    K krsmichael

    Inline asm allows a developer to access hardware that the c/c++ could not access. An example of this is the CPUID machine instructions. Before C#, if you wanted information about your hardware, you would write something like this.

    unsigned long value;
    \_highestFunction = 0;
    
    union VendorUnion
    {
    	unsigned long vendorLong;
    	unsigned char vendorArray\[4\];
    } vendorTail;
    
    unsigned char temp;
    
    \_\_asm
    {
    	mov eax, 0x00
    	cpuid
    
    	mov value, eax
    	mov vendorTail.vendorLong, ecx
    }
    
    \_highestFunction = value;
    
    // swap some values so that the switch statement will be more readable...
    temp = vendorTail.vendorArray\[0\];
    vendorTail.vendorArray\[0\] = vendorTail.vendorArray\[3\];
    vendorTail.vendorArray\[3\] = temp;
    
    temp = vendorTail.vendorArray\[2\];
    vendorTail.vendorArray\[2\] = vendorTail.vendorArray\[1\];
    vendorTail.vendorArray\[1\] = temp;
    
    switch (vendorTail.vendorLong)
    {
    	case 'ter!': \_vendorID = eAMDK5; break;
    	case 'cAMD': \_vendorID = dAMD; break;
    	case 'auls': \_vendorID = eCentaur; break;
    	case 'tead': \_vendorID = eCyrix; break;
    	case 'ntel': \_vendorID = eIntel; break;
    	case 'Mx86': \_vendorID = eTransmeta; break;
    	case 'aCPU': \_vendorID = eTransmeta; break;
    	case ' NSC': \_vendorID = eNationalSemiconductor;	break;
    	case 'iven': \_vendorID = eNexGen; break;
    	case 'Rise': \_vendorID = eRise; break;
    	case ' SIS': \_vendorID = eSiS; break;
    	case ' UMC': \_vendorID = eUMC; break;
    	case ' VIA': \_vendorID = eVIA; break;
    }
    
    unsigned long \_eax, \_ebx, \_ecx, \_edx;
    
    \_\_asm
    {
    	mov eax, 0x01
    	cpuid
    
    	mov \_eax, eax;
    	mov \_ebx, ebx
    	mov \_ecx, ecx
    	mov \_edx, edx
    }
    
    
    // setting eax to 3 will get the cpu id
    if (\_highestFunction >= 3)
    {
    	\_\_asm
    	{
    		mov eax, 0x03
    		cpuid
    
    	}
    }
    

    Writing that same code in pure ASM would be a pain but in this case, you can use the higher level language when appropriate but use the assembly to access the hardware. The ASM being platform dependent is irrelevant at this point because that is the point. The only time that C# or Java can outperform C++ is when a loop is being performed and the VM can rearrange the byte codes to predict execution. C++ is statically built so the speed is constant. Other than that, I am aware of no instances of C# or Java being faster than well written C++.

    The Weird and The Wonderful c++ help learning

  • Quick Nap
    K krsmichael

    Grrr....you beat me to the punch line!

    The Weird and The Wonderful

  • Thats why i hate c++
    K krsmichael

    I stand corrected. You are older and not 15.

    The Weird and The Wonderful c++ help learning

  • Thats why i hate c++
    K krsmichael

    Vasily, by definition, C# is a sandbox. That is what managed code means. You run in a sandbox and don't have access to the process space. Sandbox. Got it? So, you want one thing? Write me a device driver in C#. Another? Write me an HTTP server that can handle 100,000+ simultaneous connections. I can do that in C++ using overlapped IO and completion ports. I hear the same arguments from the Java guys. My Grails on Groovy on Java framework can handle 200 simultaneous connections and it doesn't matter because I can throw more hardware at it. Do you have any idea how many machines you will need to replace the 1 C++ machine? You talk about making system DLL calls. What do you think those DLLs are written in? And, BTW, if you don't have the C/C++ run-times installed, those DLLs will not load either. I gave you the solution to your problem. I use QT. QT's streams are a wonder as well. And you know what, they are a lot faster too. QT and C# with WPF gives you declarative programming. Guess what, C++ and QT are much faster again. Both are equivalently trivial. You allude to an idea that I don't have a clue. Go back and read what I wrote about insulting people when you make a bold statement and then try to argue the point. My guess is you are about 15 years old. You are learning to program and you still have holes in your knowledge. Me, I'm 50 years old. I've been doing this since the Apple II days. I've done mainframe. I can do assembly, PASCAL, PL1, C, C++, C#, Perl, Python, JavaScript, Java, HTML, device drivers, DLLs, servers, clients, OpenSSL, mobile devices, and much more. I can do all this stuff on Windows, Windows CE, MacOSx and Linux. Oh, and BTW, you can't do inline ASM. M

    The Weird and The Wonderful c++ help learning

  • Thats why i hate c++
    K krsmichael

    I have never had a problem haunt me for weeks. Post your code here for review. I'm certain I could fix it in a few minutes. I can write C# code that would haunt you for weeks. As far a feeling alone. I'm certain that you are not alone. I work with other engineers who are stuck a Perl. When they try Python or C#, there are too many problems to solve. They will tell you that Perl is easy and doesn't have any problems. Take an assembly language class. I think it will illuminate just what computers do.

    The Weird and The Wonderful c++ help learning

  • Thats why i hate c++
    K krsmichael

    I promise you that you surely don't know what you are talking about. The symptom you are describing is an operating system issue. You are: step one - missing dlls. C++ Builder will alter the environment variables to account for any dlls you are dependent on. step two - when your code is in the wild, it needs the dependent dlls. That includes any dlls that you have written and the C++ Builder C/C++ runtime dlls. step three - if you were using Visual Studio, you would need to install vcredist when running wild. step four - Java, C#, Python... all have their issue that correspond to this one. step five - Don't post here and ask for help and then argue with the people who are trying to help you. You come off arrogant and based on your first post, you don't have the right to be that arrogant. If you hate C++, try C#. If you know C#, stick with C#. Just know that you won't be able to do anything outside the sandbox.

    The Weird and The Wonderful c++ help learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups